﻿
//加载局部视图
function GetContent(index) {
    if (index == 1) {
        $(".content").load("/Detail/MyProduct");
    }
    else if (index == 2) {

        $(".content").load("/Detail/Charge");
    }
}

/// 全选复选框绑定事件全选 取消全选 样式下的checkbox
function checkAll(className, id) {

    var ipt = $("#" + id);
    var chklist = $("." + className).find("input[type='checkbox']");

    if (ipt.is(':checked')) {

        chklist.prop("checked", true);

    } else {
        chklist.prop("checked", false);
    }
}
//取消所有checkbox选中情况
function SetCheckedFaslse(className)
{
    var chklist = $("." + className).find("input[type='checkbox']");
    chklist.prop("checked", false);
}

/// 获取选中的value  checkbox
function GetCheckVals(className) {
    var url = "";
    var chklist = $(className).find("input:checkbox[name=check]:checked").each(
        function (i) {
            url += $(this).val() + ",";
        });
    if (url.length == 0) {
        return "";
    }
    url = url.substring(0, url.length - 1);
    return url;
}
function SuccessAlert(obj)
{
    layer.msg(obj, { time: 3000, icon: 6 });
}
function FailedAlert(obj) {
    layer.msg(obj, { time: 3000, icon: 7 });
}
function CheckData()
{

}